﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace Company.UI.CustomControls
{
    public class CustomRadioButton : RadioButton
    {
        public object AdditionalTag
        {
            get { return (object)GetValue(AdditionalTagProperty); }
            set { SetValue(AdditionalTagProperty, value); }
        }
        // 附加标签，接受任意类型对象。
        public static readonly DependencyProperty AdditionalTagProperty =
            DependencyProperty.Register("AdditionalTag", typeof(object), typeof(CustomRadioButton), new PropertyMetadata(null));

        public object Icon
        {
            get { return (object)GetValue(IconProperty); }
            set { SetValue(IconProperty, value); }
        }
        // 按钮图标
        public static readonly DependencyProperty IconProperty =
            DependencyProperty.Register("Icon", typeof(object), typeof(CustomRadioButton), new PropertyMetadata(null));

        public SolidColorBrush IconFillColor
        {
            get { return (SolidColorBrush)GetValue(IconFillColorProperty); }
            set { SetValue(IconFillColorProperty, value); }
        }

        public static readonly DependencyProperty IconFillColorProperty =
            DependencyProperty.Register("IconFillColor", typeof(SolidColorBrush), typeof(CustomRadioButton), new PropertyMetadata(new SolidColorBrush(Color.FromArgb(0, 0, 0, 0))));

        public double IconWidth
        {
            get { return (double)GetValue(IconWidthProperty); }
            set { SetValue(IconWidthProperty, value); }
        }

        public static readonly DependencyProperty IconWidthProperty =
            DependencyProperty.Register("IconWidth", typeof(double), typeof(CustomRadioButton), new PropertyMetadata(20.0));

        public double IconHeight
        {
            get { return (double)GetValue(IconHeightProperty); }
            set { SetValue(IconHeightProperty, value); }
        }

        public static readonly DependencyProperty IconHeightProperty =
            DependencyProperty.Register("IconHeight", typeof(double), typeof(CustomRadioButton), new PropertyMetadata(20.0));


        public double IconStrokeThickness
        {
            get { return (double)GetValue(IconStrokeThicknessProperty); }
            set { SetValue(IconStrokeThicknessProperty, value); }
        }

        public static readonly DependencyProperty IconStrokeThicknessProperty =
            DependencyProperty.Register("IconStrokeThickness", typeof(double), typeof(CustomRadioButton), new PropertyMetadata(1.0));


        public CornerRadius CornerRadius
        {
            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
            set { SetValue(CornerRadiusProperty, value); }
        }

        public static readonly DependencyProperty CornerRadiusProperty =
            DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(CustomRadioButton), new PropertyMetadata(new CornerRadius(0,0,0,0)));








    }
}
